package org.sxm.cloud.client;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.sxm.cloud.dto.product.ProductDTO;
import org.sxm.cloud.entity.order.OrderEntity;

/**
 * 产品服务
 */
@FeignClient(name = "order-svc")
public interface OrderClient {

    /**
     * 订单支付
     * @param id
     * @return
     */
    @GetMapping("/order/{id}")
    OrderEntity getOrder(@PathVariable("id") Integer id);

    /**
     * 支付更新订单状态
     * @param orderId
     * @param
     * @return
     */
    @PostMapping("/order/pay/update")
     String updateOrder(@RequestParam("orderId")Integer orderId);

    }
